package com.lg.atp.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.lg.atp.dao.TblTestTaskCaseRunMapper;
import com.lg.atp.entity.TblTestTaskCaseRun;
import com.lg.atp.entity.TblTestTaskCaseRunWithBLOBs;
import com.lg.atp.service.ITaskCaseRunService;

@Service("iTaskCaseRunService")
public class ITaskCaseRunServiceImpl implements ITaskCaseRunService {
	
	@Autowired
	private TblTestTaskCaseRunMapper tblTestTaskCaseRunMapper;
	
	
	@Override
	public int deleteByCaseRunId(Integer id) {
		// TODO Auto-generated method stub
		return tblTestTaskCaseRunMapper.deleteByCaseRunId(id);
	}

	@Override
	public int insertTaskCaseRun(TblTestTaskCaseRunWithBLOBs record) {
		// TODO Auto-generated method stub
		return tblTestTaskCaseRunMapper.insertTaskCaseRun(record);
	}

	@Override
	public int insertTaskCaseRunSelective(TblTestTaskCaseRunWithBLOBs record) {
		// TODO Auto-generated method stub
		return tblTestTaskCaseRunMapper.insertTaskCaseRunSelective(record);
	}

	@Override
	public TblTestTaskCaseRunWithBLOBs selectByTaskCaseRunId(Integer id) {
		// TODO Auto-generated method stub
		return tblTestTaskCaseRunMapper.selectByTaskCaseRunId(id);
	}

	@Override
	public int updateByTaskCaseRunIdSelective(TblTestTaskCaseRunWithBLOBs record) {
		// TODO Auto-generated method stub
		return tblTestTaskCaseRunMapper.updateByTaskCaseRunIdSelective(record);
	}

	@Override
	public int updateByTaskCaseRunIdWithBLOBs(TblTestTaskCaseRunWithBLOBs record) {
		// TODO Auto-generated method stub
		return tblTestTaskCaseRunMapper.updateByTaskCaseRunIdWithBLOBs(record);
	}

	@Override
	public int updateByTaskCaseRunId(TblTestTaskCaseRun record) {
		// TODO Auto-generated method stub
		return tblTestTaskCaseRunMapper.updateByTaskCaseRunId(record);
	}

	@Override
	public TblTestTaskCaseRunWithBLOBs selectByJobId(String JobId) {
		// TODO Auto-generated method stub
		return tblTestTaskCaseRunMapper.selectByJobId(JobId);
	}
	
	@Override
	public List<TblTestTaskCaseRunWithBLOBs> selectByTaskId(Long taskId) {
		// TODO Auto-generated method stub
		return tblTestTaskCaseRunMapper.selectByTaskId(taskId);
	}

	@Override
	public int selectSuccesRunCountByTaskId(Long testTaskId) {
		return tblTestTaskCaseRunMapper.selectSuccesRunCountByTaskId(testTaskId).size();
	}

}
